package com.lening.iot.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lening.common.base.BaseController;
import com.lening.iot.dto.AccontrolDTO;
import com.lening.iot.dto.HamangerDTO;
import com.lening.iot.po.HamangerPO;
import com.lening.iot.service.IHamangerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.reactive.function.client.WebClient;

import java.util.List;

/**
 * @ToDo:
 * @Author：李忠达
 * @date: 2024/6/4 10:55
 */
@RestController
@RequestMapping("/hamangers")
public class HamangerController extends BaseController<HamangerPO,HamangerDTO, IHamangerService> {
    @Autowired(required = false)
    private WebClient webClient;

    @Autowired
    private IHamangerService hamangerService;
    @GetMapping("/getAllHam")
    public Page<HamangerDTO> getAllHam(Page<HamangerDTO> acowreviewdto){

        Page<HamangerDTO> acowreviewList = hamangerService.getAllHam(acowreviewdto);
        return acowreviewList;
    }

//    @Override
//    public Page<?> page(HamangerDTO hamangerDTO) {
//        return hamangerService.getAllHam(hamangerDTO);
//    }
@GetMapping("/getAll")
public List<HamangerDTO> getAll(String communityName) {
return hamangerService.getAll(communityName);
}
}
